package demo2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 苏西西
 * Date: 2023-10-29
 * Time: 17:00
 */
public class Test {
    public static void main(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.add(1);
        myArrayList.add(2);
        myArrayList.add(3);


        myArrayList.add(4);


        try{
            myArrayList.add(2,99);
        }catch(IndexOutOfException e){
            e.printStackTrace();
        }
        myArrayList.display();
        System.out.println();
        System.out.println(myArrayList.get(0));
    }
}
